/* Layout */
const Layout = resolve => require(['@/views/layout/Layout'], resolve);

const CustomerRouterMap = {
  id: 55,
  path: '/customer',
  component: Layout,
  redirect: '/customer/mine',
  name: '客户管理',
  meta: {title: '客户资源', icon: 'customer', power: 'customer'},
  showMode: 'DEFAULT',
  alwaysShow: true,
  children: [
    {
      id: 56,
      path: 'mine',
      name: '客户仓库',
      component: resolve => require(['@/views/customer/mine'], resolve),
      meta: {title: '客户仓库', icon: 'customerlist', power: 'customer.mine'},
      children: [
        {
          path: 'modify',
          name: '新增 / 详情',
          component: resolve => require(['@/views/customer/mine/modify.vue'], resolve),
          meta: {title: '新增 / 详情', power: 'customer.mine.modify'},
          hidden: true
        }, {
          path: 'record',
          name: '沟通记录',
          component: resolve => require(['@/views/customer/mine/record.vue'], resolve),
          meta: {title: '沟通记录', power: 'customer.mine.record'},
          hidden: true
        }
      ]
    }, {
      id: 170,
      path: 'overdue',
      name: '逾期客户',
      component: resolve => require(['@/views/customer/mine/overdue'], resolve),
      meta: {title: '逾期客户', icon: 'customerlist', power: 'customer.overdue'}
    }, {
      id: 171,
      path: 'lose',
      name: '丢单客户',
      component: resolve => require(['@/views/customer/mine/lose'], resolve),
      meta: {title: '丢单客户', icon: 'customerlist', power: 'customer.lose'}
    }, {
      id: 0,
      path: 'review',
      name: '待接收客户',
      component: resolve => require(['@/views/customer/receive.vue'], resolve),
      meta: {title: '待接收客户', icon: 'customerreceive', power: 'customer.review'}
    }, {
      id: 0,
      path: 'pool',
      name: '客户公海',
      component: resolve => require(['@/views/customer/pool'], resolve),
      meta: {title: '客户公海', icon: 'customerpool', power: 'customer.pool'},
      children: [
        {
          path: 'modify',
          name: '添加 / 详情',
          component: resolve => require(['@/views/customer/pool/modify.vue'], resolve),
          meta: {title: '添加 / 详情', power: 'customer.pool.modify'},
          hidden: true
        }
      ]
    }, {
      id: 0,
      path: 'limit',
      name: '公海额度管理',
      component: resolve => require(['@/views/customer/pool/limit.vue'], resolve),
      meta: {title: '公海额度管理', icon: 'limit', power: 'customer.limit'}
    }, {
      id: 255,
      path: 'config',
      name: '基本设置',
      component: resolve => require(['@/views/customer/config/index.vue'], resolve),
      meta: {title: '基本设置', icon: 'setting', power: 'customer.config'}
    }
  ]
};

export default CustomerRouterMap;
